Singleton class that implements IGame
Properties
Camera
Gets the primary camera. This is the default camera that is created automatically at the start of the game and cannot be deleted.
CameraCount
Gets the number of cameras.
Cameras
Returns the Camera instance by its index. There's always at least primary camera at the index 0, more could be created in script using Camera.Create.
CharacterCount
Gets the number of characters in the game.
DialogCount
Gets the number of dialogs in the game.
FileName
Gets the name of the game EXE file.
FontCount
Gets the number of fonts in the game.
GlobalMessages
Accesses the legacy Global Messages, from AGS 2.x
GlobalStrings
Accesses the global strings collection. This is obsolete.
GUICount
Gets the number of GUIs in the game.
IgnoreUserInputAfterTextTimeoutMs
Gets/sets the time for which user input is ignored after some text is automatically removed
InSkippableCutscene
Checks whether the game is currently in the middle of a skippable cutscene.
InventoryItemCount
Gets the number of inventory items in the game.
MinimumTextDisplayTimeMs
int MinimumTextDisplayTimeMs
Gets/sets the minimum time that a piece of speech text stays on screen (in milliseconds)
MouseCursorCount
Gets the number of mouse cursors in the game.
NormalFont
Gets/sets the normal font used for displaying text.
SkippingCutscene
Checks whether the game is currently skipping over a cutscene.
SpeechFont
Gets/sets the font used for displaying speech text.
SpriteHeight
Gets the height of the specified sprite.
SpriteWidth
Gets the width of the specified sprite.
TextReadingSpeed
Gets/sets how fast speech text is removed from the screen.
TranslationFilename
Gets name of the currently active translation.
UseNativeCoordinates
bool UseNativeCoordinates
Gets whether the game is using native co-ordinates.
ViewCount
Gets the number of views in the game.
Methods
ChangeTranslation
Changes the active translation.
DoOnceOnly
bool DoOnceOnly(string token)
Returns true the first time this command is called with this token.
GetColorFromRGB
int GetColorFromRGB(int red, int green, int blue)
Gets the AGS Colour Number for the specified RGB colour.
GetFrameCountForLoop
Gets the number of frames in the specified view loop.
GetLocationName
string GetLocationName(int x, int y)
Gets the name of whatever is on the screen at (x,y)
GetLoopCountForView
Gets the number of loops in the specified view.
GetMODPattern
Returns the current pattern/track number if the current music is MOD or XM.
GetRunNextSettingForLoop
Gets whether the "Run next loop after this" setting is checked for the specified loop.
GetSaveSlotDescription
string GetSaveSlotDescription(int saveSlot)
Gets the description of the specified save game slot.
GetViewFrame
ViewFrame GetViewFrame(int view, int loop, int frame)
Gets the ViewFrame instance for the specified view frame.
IsAudioPlaying
Gets whether any audio (of this type) is currently playing.
SaveSettings
Saves game settings for current user.
SetAudioTypeSpeechVolumeDrop
void SetAudioTypeSpeechVolumeDrop(AudioType audioType, int volumeDrop)
Changes the volume drop applied to this audio type when speech is played
SetAudioTypeVolume
void SetAudioTypeVolume(AudioType audioType, int volume, ChangeVolumeType changeVolumeType)
Changes the default volume of audio clips of the specified type.
SetSaveGameDirectory
Sets the directory where AGS will save and load saved games.
StopAudio
void StopAudio()
void StopAudio(AudioType audioType)
Stops all currently playing audio (optionally of the specified type).
StopSound
Stops all currently playing sound effects.